<ion-modal-view>
  <ion-header-bar class="bar-assertive">
    <button menu-toggle="left" class="button button-clear" ng-click="closeChangeCodeModal()">
      <i class="icon ion-ios-close"></i>
    </button>
    <div class="h1 title">Change PIN code</div>
  </ion-header-bar>
  <ion-content class="has-header" padding="'true'">
    <div class="list">
      <div class="item">
        <form name="changeCode" ng-submit="ChangeCode(oldCode,newCode)">
          <label class="item item-input">
            <span class="input-label">Current PIN</span>
            <input type="password" ng-model="oldCode" pattern="[0-9]*" maxlength="4" minlength="4" placeholder="insert current PIN" onkeypress='return event.charCode >= 48 && event.charCode <= 57' required>
          </label>
          <label class="item item-input">
            <span class="input-label">New PIN</span>
            <input type="password" ng-model="newCode" pattern="[0-9]*" maxlength="4" minlength="4" placeholder="insert 4 digits PIN" onkeypress='return event.charCode >= 48 && event.charCode <= 57' required>
          </label>
          <label class="item item-input padding-bottom">
            <span class="input-label">Confirm PIN</span>
            <input type="password" pattern="[0-9]*" maxlength="4" ng-model="confirmNewCode" minlength="4" placeholder="insert 4 digits PIN again" onkeypress='return event.charCode >= 48 && event.charCode <= 57' required>
          </label>
          <button ng-disabled="!changeCode.$valid || confirmNewCode!=newCode"  class="button button-block button-energized" type="submit" ng-disabled="">Change</button>
        </form>
      </div>
    </div>
  </ion-content>
</ion-modal-view>
